package com.group02.community.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.group02.community.entity.user.SysMenu;
import com.group02.community.entity.vo.MenuVO;
import com.group02.community.entity.vo.queryVO.MenuQueryVO;
import com.group02.community.mapper.MenuMapper;
import com.group02.community.service.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 菜单权限表 服务实现类
 * </p>
 *
 * @author chenheng
 * @since 2022-07-06
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, SysMenu> implements IMenuService {


    @Autowired
    MenuMapper menuMapper;

    @Override
    public List<MenuVO> getAllMenu(MenuQueryVO mq) {
        List<MenuVO> menus = menuMapper.selectAllMenu(mq);
        return menus;
    }

    @Override
    public List<MenuVO> selectMenuByQuery(MenuQueryVO mq) {
        return menuMapper.selectMenuByQuery(mq);
    }
}
